Repository navigation
test(ci): run the workspace tests on Windows - #87
Conversation
Windows reserves 1 MB of stack for the main thread. Linux and macOS give it 8 MB. A debug build of rune overflowed 1 MB while it built its command tree, before any command ran: `rune --version` ended with "thread 'main' has overflowed its stack". Every integration test runs the debug binary, so every one of them failed on Windows. build.rs now passes /STACK:8388608 to the MSVC linker for the rune binary, and --stack to the GNU linker. Other platforms are unchanged. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
rune ignored HOME on Windows. `dirs` asks the shell for its known
folders and reads no environment variable, so nothing could point rune
at another home. The tests isolate themselves through HOME: on Windows
they would have rewritten the developer's own ~/.claude and ~/.codex.
src/folders.rs now answers for the home, cache, data, and state
folders. On Windows a HOME that holds an absolute path is the home, and
the cache and data folders sit under it. Unix is unchanged.
fs::canonicalize answers `\\?\C:\repo` on Windows. In that form `/` is
not a separator, so `root.join("rules/Style.md")` names no file, and
the path does not equal the same folder written `C:\repo`.
folders::canonicalize and the Canonical trait answer `C:\repo`.
folders::join joins a path written with `/` one part at a time, so a
printed path has one kind of separator. rune-docs carries its own copy
of canonicalize in support.rs, as it does for its other helpers.
A relative path became text with `\` between its parts. The bundle and
source snapshot code refuses a `\` as ambiguous, so `rune install`
refused every skill. manifest::slash_text and slash_lossy write `/` on
every platform, and provenance_path uses them.
tests/support also points USERPROFILE, APPDATA, and LOCALAPPDATA at
the scratch HOME on Windows, for the tools a test starts.
Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
…work Every `dirs::home_dir`, `cache_dir`, `data_dir`, and `state_dir` becomes the same call on `folders`. Every `fs::canonicalize(x)` becomes `folders::canonicalize(x)`, and every `x.canonicalize()` becomes `x.canonical()`. A relative path that is a key goes through manifest::slash_lossy. Before this, on Windows: - `rune install` wrote manifest keys such as `SmokeSkill\Notes.md`, and `rune doctor` reported every deployed file as an orphan. - The skill readiness check found no manifest claim for any skill. - A session exclusion never matched a working folder, so an excluded session was captured. - The project-scope target key kept `\` and the drive colon. It was an absolute path, and joining it dropped the home folder. - The Codex skill migration, the source walk, the skill layer report, drift, the provenance scan, validate, and init built keys with `\`. `rune sign` read /dev/urandom for the seal nonce. Windows has no such file and now uses getrandom, which was already in the dependency tree. A printed path has one kind of separator, the `~/` form is written with `/`, and the usage line says `rune`, not `rune.exe`. The tests that compared a path as text now build it the way rune prints it, and two fixtures that wrote a Windows path into a TOML or a JSON string now escape it. Each gives the same text on Unix. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
146 tests cannot run on Windows: they start a shell script as a program, need the executable bit, signal a process group, or run python3 or make. Each now has `#[cfg_attr(windows, ignore = "<reason>")]`. It runs on Linux and macOS as before, and a Windows run reports it as ignored. 61 of them are hook tests. rune hooks assume /bin/sh, the executable bit, and paths that start with `/`, and are not supported on Windows. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
The Windows job compiled rune and tested rune-docs, so it could not see that `rune install` did not work there. It now installs jj and mdschema, puts the tools of Git for Windows first on the PATH, and runs `cargo test --locked --workspace`. scripts/install-tools installs jj and mdschema under Git Bash: it knows the Windows archive names, unzips them, and installs the .exe. scripts/tool-versions has the two digests. Co-Authored-By: Martin Zeman <N4M3Z@users.noreply.github.com>
|
review/correctness round 1 started on |
|
Claude finished @Runewright[bot]'s task in 4m 14s —— View job Correctness review
Request changes. One issue is still open: the new
|
| } | ||
| rest.to_owned() | ||
| }; | ||
| (plain.len() < 260 && plain.split('\\').all(part_reads_as_written)).then_some(plain) |
There was a problem hiding this comment.
Medium — canonicalize answers in the plain form only while the result is under 260 bytes and keeps the verbatim \\?\ form otherwise, so a confinement check between a short base and a long descendant compares two spellings of the same file and gives the wrong answer.
src/folders.rs:91The length rule decides the spelling, so one process can hold both forms at once.rune-docs/src/support.rs:121resolved.starts_with(&resolved_base)then rejects a contained file, andrefuse_inside_checkoutinsrc/cli/run/workspace.rs:798fails to reject one inside the checkout.
Runeseer review — 1 open finding
Request changes. One issue is still open: the new
1 open · Reviewed |
|
@N4M3Z, the following findings block this head:
Choose one action:
|
|
review/correctness round 2 started on |
|
Claude finished @abominable-intelligence's task in 1m 18s —— View job Correctness review
Request changes. HEAD's tree is identical to the previously reviewed
|
Runeseer needs attention — invalid review outputRuneseer received a verdict, but deterministic validation rejected it. Inspect the validation error. Then request a new review round. Rerun this workflow only when the pull request head is unchanged. Otherwise, clear Affected head: |
Draft for
change/rune-runs-on-windows: the session agent fills this body beforerune sign open.Plan
Why this shape, one or two sentences.
Changes
Testing
Release Notes
Note
Run the workspace test suite on Windows
folders::canonicalizestrips Windows verbatim path prefixes when a plain spelling is valid,folders::joinsplits slash-delimited strings into native components, and home/cache/data/state lookups replace thedirscrateslash_text/slash_lossyformatters in src/manifest/mod.rs and migrates paths used in manifests, findings, and validation output to/separators on Windowsgetrandom::fillinstead of/dev/urandomin src/cli/sign/seal.rs, and project-scope target keys handle\and:in src/target/mod.rs.exenames, and MSYS/MINGW detection, and build.rs requests an 8 MiB stack for Windows binariespython3); test isolation setsUSERPROFILE,APPDATA, andLOCALAPPDATAunder the scratch home on Windows\\?\\prefix, and manifest/finding path text changes to/separators — consumers comparing raw canonical or display paths (e.g.session/exclude.rsglob handling,manifest/source_snapshot.rsvalidation) are migrated in-tree but out-of-tree comparisons of stored path text may need adjustmentMacroscope summarized 8237437.